{% extends 'layout.html' %}
{% load static %}
{% block css %}
    <link rel="stylesheet" href="{% static 'css/driving.css' %}">
{% endblock %}
{% block search %}
    <!--搜索框-->
    <div class="col-lg-6" style="width: 300px;float: right;margin-top: 10px;">
        <form method="get">
            <div class="input-group">
                <input type="text" class="form-control" placeholder="通过驾校名搜索" name="q"
                       value="{{ kuang_data }}">
                <span class="input-group-btn">
                            <button class="btn btn-default" type="submit">
                            <span class="glyphicon glyphicon-search" aria-hidden="true" style="color: #ccc;">搜索</span>
                            </button>
                </span>
            </div>
        </form>
    </div>
{% endblock %}
{% block content %}
    <div class="container">
        <div class="row" style="margin-bottom: 20px;">
            <ul class="nav nav-pills">
                {% for item in category_list %}
                    <li style="background-color: #d5d5d5;border-radius: 5px"><a
                            href="\user\{{ item.id }}\index\">{{ item.cname }}</a></li>
                {% endfor %}
            </ul>
        </div>
        <div class="row flex">
            {% for goods in goods_list %}
                <a href="\goods\goodsdetails\{{ goods.id }}\" class="col-sm-6 col-md-3" style="text-decoration: none">
                    <div class="item">
                        <img style="height: 120px" src="/media/{{ goods.colorurl }}" alt="">
                        <p class="name">{{ goods.gname }}</p>
                        <p class="name">{{ goods.sname }}</p>
                        <p class="price">{{ goods.price }}</p>
                    </div>
                </a>
            {% endfor %}
        </div>
        <ul class="pagination">
            {{ page_string }}
        </ul>
    </div>
{% endblock %}